Skip to content

✨ Split SDK helper contracts#256

Merged
Robdel12 merged 2 commits into
mainfrom
rd/cli-audit-sdk-helpers
May 18, 2026
Merged

✨ Split SDK helper contracts#256
Robdel12 merged 2 commits into
mainfrom
rd/cli-audit-sdk-helpers

Conversation

@Robdel12
Copy link
Copy Markdown
Contributor

@Robdel12 Robdel12 commented May 18, 2026

Why

The SDK and browser client are the public entrypoints people build around, so they need to be the most boring part of the CLI: stable config handling, predictable helper behavior, and type definitions that match the actual runtime. Before this split, a lot of that logic lived inline or behind implicit behavior, which made later command and server cleanup harder to review safely.

This PR establishes the small shared helper contracts first. That gives the rest of the stack a clean base for URL normalization, screenshot option normalization, timeout behavior, wildcard matching, and SDK service creation without pulling unrelated command/server changes into the same review.

What Changed

  • Tightened the SDK/client surface and matching type definitions.
  • Added focused helpers for API URL derivation, async timeouts, fetch timeouts, wildcard matching, and screenshot property normalization.
  • Added regression coverage for SDK config updates and helper behavior.
  • Updated type tests so published typings track the new public surface.

Verification

  • npm run build
  • npm run test:types
  • node --test tests/utils/api-url.test.js tests/utils/async-utils.test.js tests/utils/fetch-utils.test.js tests/utils/patterns.test.js tests/utils/screenshot-options.test.js tests/sdk/client.test.js tests/sdk/index.test.js tests/api/endpoints.test.js

Stack

1/10 in the CLI audit stack.

Base: main
Head: rd/cli-audit-sdk-helpers

Carve the SDK, client, and low-level helper contract changes into their own reviewable slice.
@vizzly-testing

This comment has been minimized.

@vizzly-testing

This comment has been minimized.

Why: the first stack slice should validate on its own instead of reaching into the later uploader-boundary PR. Keep the SDK public factory wired to the existing uploader service until that boundary is migrated in its dedicated slice.
@Robdel12 Robdel12 force-pushed the rd/cli-audit-sdk-helpers branch from 3defb01 to 8b9bcbf Compare May 18, 2026 19:00
@vizzly-testing
Copy link
Copy Markdown

vizzly-testing Bot commented May 18, 2026

Vizzly - Visual Test Results

CLI Reporter - 1 change needs review
Status Count
Passed 18
Changed 1
Auto-approved 18
Changes needing review (1)

fullscreen-viewer · Firefox · 375×667 · 78.5% diff

fullscreen-viewer

Review changes

CLI TUI - Approved

5 comparisons, no changes detected.

View build


rd/cli-audit-sdk-helpers · 8b9bcbf0

@Robdel12 Robdel12 merged commit f08e059 into main May 18, 2026
29 of 30 checks passed
@Robdel12 Robdel12 deleted the rd/cli-audit-sdk-helpers branch May 18, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant